<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>{{$title}}</title>
    <!-- 基底标签,本页的URL 都基于此路径拼接 -->
    <base href="{{$smarty.const.URL}}">
    <link rel="stylesheet" href="public/css/bootstrap.min.css">
    <link rel="stylesheet" href="public/reset.css">
</head>
<body>

<div class="container">
    <h1>{{$title}}</h1>
    <div class="mt20">
        <a href="User/index" class="btn btn-lg btn-default">用户首页</a>
        <a href="User/add" class="btn btn-lg btn-success">添加</a>
    </div>

{{block name="main"}}
    <div class="row">
        <table class="table table-hover">
            <tr>
                <th>ID</th>
                <th>NAME</th>
                <th>SEX</th>
                <th>AGE</th>
                <th>PRO</th>
                <th>EDIT</th>
            </tr>
            {{foreach $list as $v}}
            <tr>
                <td>{{$v['id']}}</td>
                <td>{{$v['name']}}</td>
                <td>
                    {{if $v['sex'] == 0}}女
                    {{elseif $v['sex'] == 1}}男
                    {{else}}保密
                    {{/if}}
                </td>
                <td>{{$v['age']}}</td>
                <td>{{$v['province']}}</td>
                <td class="col-md-2">
                    <a href="User/edit/id/{{$v['id']}}" class="btn btn-sm btn-primary">编辑</a>
                    <a href="User/del/id/{{$v['id']}}" class="btn btn-sm btn-danger">删除</a>
                </td>
            </tr>
            {{/foreach}}
        </table>
    </div><!--END row-->
{{/block}}

</div><!--END container-->




<script src="./public/js/jquery.min.js"></script>
<script src="./public/js/bootstrap.min.js"></script>
</body>
</html>